package com.itheima.sh.clients;

import com.itheima.sh.pojo.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Primary;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@Primary
@FeignClient(value = "order-service")
public interface OrderFeignApi {

    @GetMapping("/order/{username}")
    public List<Order> findOrderByUserId(@PathVariable("username")String username);
}
